package com.tehui.utils.tools;

/**
 * Created by jasmine on 2017/3/30.
 */
public class Rex {

    /**
     * 正则表达式验证密码
     * @param input
     * @return
     */
    public static boolean rexCheckPassword(String input) {
        // 6-20 位，字母、数字、字符
        //String reg = "^([A-Z]|[a-z]|[0-9]|[`-=[];,./~!@#$%^*()_+}{:?]){6,20}$";
        String regStr = "^([A-Z]|[a-z]|[0-9]|[`~!@#$%^&*()+=|{}':;',\\\\[\\\\]" +
                ".<>/?~！@#￥%……&*（）——+|{}【】‘；：”“'。，、？]){6,20}$";

        String str = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$";

        return input.matches(regStr);
    }
}
